package com.qianyucc.blog.model.dto;

import lombok.*;

import javax.validation.constraints.*;

/**
 * @author lijing
 * @date 2019-10-18 20:21
 * @description 封装从前端传递过来的文章信息
 */
@Data
public class ArticleDTO {
    private String id;
    private String draftId;
    @NotBlank(message = "文章标题不能为空")
    private String title;
    @NotBlank(message = "文章内容不能为空")
    private String content;
    //@Length(message = "文章标签不能为空",min = 1)
    private String[] tags;
    @NotBlank(message = "文章分类不能为空")
    private String category;
    @NotBlank(message = "文章摘要不能为空")
    private String tabloid;
    @NotNull(message = "文章类型不能为空")
    private Integer type;
    private String author;
}